﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Police/Police.master" AutoEventWireup="true"
    StylesheetTheme="Content" CodeFile="SoldierSelect.aspx.cs" Inherits="BasicBase_SoldierArchive_SoldierSelect" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script type="text/javascript">
        function print() {
            window.open('Print.aspx');

        }
        function OpenWin(url) {
            var h = 480;
            var w = 640;
            var t = (screen.height - h) / 2;
            var l = (screen.width - w) / 2;
            window.open(url, null, 'left=' + l + ",top=" + t + ",width=" + w + ",height=" + h + ",toolbar=yes,scrollbars=yes,status=yes");
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table border="0" cellpadding="0" cellspacing="0" class="dialog" width="100%">
        <caption>
            <asp:Label runat="server" ID="Caption"></asp:Label></caption>
        <tr>
            <td>
                <table border="0" cellpadding="4" cellspacing="0" width="100%">
                    <tr>
                        <td width="60px">
                            单位：
                        </td>
                        <td>
                            <asp:UpdatePanel ID="UpdatePanel3" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <asp:DropDownList ID="ddlDepartment" runat="server" AutoPostBack="True" Width="150px"
                                        OnSelectedIndexChanged="ddlDepartment_SelectedIndexChanged">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlSection" runat="server" Width="230px">
                                    </asp:DropDownList>
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="ddlDepartment" EventName="SelectedIndexChanged" />
                                </Triggers>
                            </asp:UpdatePanel>
                        </td>
                        <td width="60px">
                            编号：
                        </td>
                        <td>
                            <asp:TextBox ID="CardID" runat="server" Width="145px"></asp:TextBox>
                            <ajaxToolkit:FilteredTextBoxExtender ID="ftbCardID" runat="server" Enabled="True"
                                FilterType="Numbers" TargetControlID="CardID">
                            </ajaxToolkit:FilteredTextBoxExtender>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            姓名：
                        </td>
                        <td>
                            <asp:TextBox ID="SoldierName" runat="server" Width="142px"></asp:TextBox>
                        </td>
                        <td>
                            性别：
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlSex" runat="server" Width="150px">
                                <asp:ListItem></asp:ListItem>
                                <asp:ListItem>男</asp:ListItem>
                                <asp:ListItem>女</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            出生日期：
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlBirthOperater" runat="server" Width="150px">
                                <asp:ListItem Value="=">等于</asp:ListItem>
                                <asp:ListItem Value="&gt;">大于</asp:ListItem>
                                <asp:ListItem Value="&lt;">小于</asp:ListItem>
                                <asp:ListItem Value="&gt;=">大于等于</asp:ListItem>
                                <asp:ListItem Value="&lt;=">小于等于</asp:ListItem>
                            </asp:DropDownList>
                            <asp:TextBox ID="Birthday" runat="server" Width="85px"></asp:TextBox>
                            <ajaxToolkit:FilteredTextBoxExtender ID="fteYearCount" runat="server" Enabled="True"
                                FilterType="Numbers" TargetControlID="YearCount">
                            </ajaxToolkit:FilteredTextBoxExtender>
                        </td>
                        <td>
                            文化程度：
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlCulture" runat="server" Width="150px">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            军(工)龄：
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlAgeOperater" runat="server" Width="150px">
                                <asp:ListItem Value="=">等于</asp:ListItem>
                                <asp:ListItem Value="&gt;">大于</asp:ListItem>
                                <asp:ListItem Value="&lt;">小于</asp:ListItem>
                                <asp:ListItem Value="&gt;=">大于等于</asp:ListItem>
                                <asp:ListItem Value="&lt;=">小于等于</asp:ListItem>
                            </asp:DropDownList>
                            <asp:TextBox ID="YearCount" runat="server" Width="85px"></asp:TextBox>
                            年
                        </td>
                        <td>
                            职务：
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlDuty" runat="server" Width="150px">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            专业：
                        </td>
                        <td>
                            <asp:UpdatePanel ID="UpdatePanel2" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <asp:DropDownList ID="ddlSpeciality1" runat="server" AutoPostBack="True" Width="150px"
                                        OnSelectedIndexChanged="ddlSpeciality1_SelectedIndexChanged">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlSpeciality2" runat="server" Width="180px">
                                    </asp:DropDownList>
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="ddlSpeciality1" EventName="SelectedIndexChanged" />
                                </Triggers>
                            </asp:UpdatePanel>
                        </td>
                        <td>
                            警衔：
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlRank" runat="server" Width="150px">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            籍贯：
                        </td>
                        <td>
                            <ajaxToolkit:CalendarExtender ID="ceBirth" runat="server" Animated="False" Enabled="True"
                                Format="yyyy-MM-dd" TargetControlID="Birthday">
                            </ajaxToolkit:CalendarExtender>
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <asp:DropDownList ID="ddlProvinces" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlProvinces_SelectedIndexChanged"
                                        Width="150px">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlCities" runat="server" Width="180px">
                                    </asp:DropDownList>
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="ddlProvinces" EventName="SelectedIndexChanged" />
                                </Triggers>
                            </asp:UpdatePanel>
                        </td>
                        <td>
                            类型：
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlType" runat="server" Width="150px" AutoPostBack="True" OnSelectedIndexChanged="ddlType_SelectedIndexChanged">
                                <asp:ListItem></asp:ListItem>
                                <asp:ListItem Value="0">现役士兵</asp:ListItem>
                                <asp:ListItem Value="1">合同制</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                      
                        <td align="center" colspan="4">
                            <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" />
                        </td>
                        
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <asp:UpdatePanel ID="upResult" runat="server">
        <Triggers>
            <asp:PostBackTrigger ControlID="btnSearch" />
        </Triggers>
        <ContentTemplate>
            <asp:Panel ID="PanelList" runat="server">
                <ul class="topmenu">
                    <li></li>
                </ul>
                <asp:GridView ID="gvSoldiers" runat="server" AutoGenerateColumns="False" Caption="<span>兵员列表</span>"
                    DataKeyNames="SoldierID,DepartmentID" OnRowDeleting="gvSoldiers_RowDeleting"
                    Width="98%" OnRowDataBound="gvSoldiers_RowDataBound">
                    <Columns>
                        <asp:TemplateField ItemStyle-HorizontalAlign="Left">
                            <HeaderStyle Width="30px" HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:Label ID="ID" runat="server" ForeColor="#666666"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="姓名">
                            <ItemTemplate>
                                <a runat="server" id="AName"></a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="DepartmentName" HeaderText="单位" />
                        <asp:BoundField DataField="RankName" HeaderText="警衔" />
                        <asp:BoundField DataField="NativeName" HeaderText="籍贯" />
                        <asp:TemplateField HeaderText="入伍年月">
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Convert.ToDateTime(Eval("JoinTime")).Year==9999?"--":Convert.ToDateTime(Eval("JoinTime"))==DateTime.MinValue?"--": Convert.ToDateTime(Eval("JoinTime")).ToString("yyyy.MM") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="调动" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:ImageButton runat="server" ID="bntTanslate" ImageUrl="../../Images/TransfSolider.gif" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <RowStyle HorizontalAlign="Left" />
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:GridView>
                <asp:Panel Width="100%" runat="server" ID="panPage" Visible="false">
                    <div style="padding: 4px;">
                        <div style="float: left">
                            <asp:Label ID="lbGridInfo" runat="server"></asp:Label>
                        </div>
                        <div style="float: right">
                            <asp:LinkButton ID="btnFirst" runat="server" CommandArgument="First" CommandName="Page"
                                OnClick="btnFirst_Click">首页</asp:LinkButton>
                            <asp:LinkButton ID="btnPrev" runat="server" CommandArgument="Prev" CommandName="Page"
                                OnClick="btnPrev_Click">上一页</asp:LinkButton>
                            <asp:LinkButton ID="btnNext" runat="server" CommandArgument="Next" CommandName="Page"
                                OnClick="btnNext_Click">下一页</asp:LinkButton>
                            <asp:LinkButton ID="btnLast" runat="server" CommandArgument="Last" CommandName="Page"
                                OnClick="btnLast_Click">末页</asp:LinkButton>
                            转到：第
                            <asp:DropDownList ID="JumpList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="JumpList_SelectedIndexChanged">
                            </asp:DropDownList>
                            页
                        </div>
                    </div>
                </asp:Panel>
                <asp:Label runat="server" ID="lblWhere" Visible="False"></asp:Label>
                <asp:HiddenField ID="strSql" runat="server" />
                <asp:HiddenField ID="strPrmission" runat="server" />
                <asp:HiddenField ID="strName" runat="server" />
            </asp:Panel>
            <br />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
